﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Quotation
{
    public sealed class BasketType : StrictFlagBase<char, BasketType>
    {
        private BasketType(char value) : base(value) { }

        public static readonly BasketType Exch = new BasketType('0');
        public static readonly BasketType SecuritiesCompany = new BasketType('1');
        public static readonly BasketType Investor = new BasketType('2');

        /// <summary>
        /// 隐式类型转换
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static implicit operator BasketType(char value)
        {
            BasketType rtn;
            BasketType.TryConvert(value, out rtn);
            return rtn;
        }
    }
}
